import keyboard


def callback(x):
    if x.event_type == 'down':
        print(x.name)


keyboard.on_press(callback)
keyboard.wait()
